function start()
	print("进入主界面")
	self:LuaBindClick("CreateRoom",Click_CreateRoom)
	self:LuaBindClick("JoinRoom",Click_JoinRoom)
	self:LuaBindClick("HalfMatch",Click_HalfMatch)
	self:LuaBindClick("Shop",Click_Shop)

end

function onOpen( ... )
	-- body
	print("open main")
	self.myobj:SetLabel("lab_name",UserData.PlayerInfo.name)
	self.myobj:SetLabel("lab_userid","ID:"..UserData.PlayerInfo.uuid)
end
function onClose( ... )
	-- body
end

function update()
	
end

function ondestroy()
 
end

function  Click_CreateRoom( ... )
	print("CreateRoom")
	CS.LuaGameTool.ShowFlashText("功能暂未开放,",1)
	-- body
end

function  Click_JoinRoom( ... )
	print("CreateRoom")
	CS.LuaGameTool.ShowFlashText("功能暂未开放,",1)
	
	-- body
end

function  Click_HalfMatch( ... )
	
	
	LuaNetHelper.HalfMatch(HandleHalfMatchResult,HandleHalfMatchErrorResult)
	-- body
end

function HandleHalfMatchResult(data)
	UserData.HalfMatchData = decode(data)
	CS.LuaGameTool.LoadScene("scenegameplaying")
end

function HandleHalfMatchErrorResult()
end

function  Click_Shop( ... )
	print("CreateRoom")
	CS.LuaGameTool.ShowFlashText("功能暂未开放,",1)
	-- body
end